package com.zxd.reflect;

/**
 * ClassName:Cat
 * Package:com.zxd.reflect
 *
 * @Date:2023/10/7 19:25
 * @Author:zxde
 */
public class Cat {
    private String  name;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Cat() {
        System.out.println("无参构造被调用");
    }

    public void show(){
        System.out.println("show");
    }

    private Cat(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        return "Cat{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
